# -*- coding: utf-8 -*-
# @Time : 2022/10/26 19:00
# @Author : renyumeng
# @Email : 2035328756@qq.com
# @File : csv2Json.py
# @Project : pythonFile
import json

fo = open(r"G:\JavaProject\AlgorithmInterface\src\main\resources\pythonFile\shujv\csv\Q05_ZY01_SD3Z_SD49$62C2301.csv")
ls = []
for line in fo:
    line = line.replace("\n", "")
    ls.append(line.split(","))
fo.close()
fw = open("../../shujv/json/Q05_ZY01_SD3Z_SD49$62C2301.json", "w", encoding="utf8")
for i in range(1, len(ls)):
    ls[i] = dict(zip(ls[0], ls[i]))

json.dump(ls[1:], fw, sort_keys=True, indent=4, ensure_ascii=False)

fw.close()
